package com.lb.uts.client.model;

import java.io.Serializable;

/**
 * UTS调度执行结果JSON串统一格式封装
 *
 */
public class ResultBean implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3983062288202903508L;

	// 执行结果
	private Boolean result;

    // 响应内容
	private Object data;

	// 错误编码
    private String errorCode;

    // 错误详情
    private String errorMsg;

    public Boolean getResult() {
        return result;
    }

    public void setResult(Boolean result) {
        this.result = result;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    static ResultBean error(String errorCode, String errorMsg) {
        ResultBean bean = new ResultBean();
        bean.setResult(false);
        bean.setErrorCode(errorCode);
        bean.setErrorMsg(errorMsg);
        return bean;
    }
}
